import { MOUNTED, NOT_MOUNTED, UNMOUNTING } from "../applications/app.helper"

export function toUnmountPromise(app){
    if(app.status != MOUNTED) return app
    app.status = UNMOUNTING
    app.unmount(app.customProps)
    app.status = NOT_MOUNTED
    return app
}